#{extends 'main.html' /}

<div id="crudList" class="${type.name}">

  <h2 id="crudListTitle">${session.clientName} Payroll Periods</h2>

  <div id="crudListSearch">
    #{crud.search /}
  </div>

  <div id="crudListTable">
    #{crud.table fields:['fromDate', 'toDate', 'Action'], sort:'false'}
      #{crud.custom 'fromDate'}
        <a href="/admin/payrollperiods/${object.id}">${object.fromDate.format("yyyy-MM-dd")}</a>
      #{/crud.custom}
      #{crud.custom 'toDate'}
        ${object.toDate.format("yyyy-MM-dd")}
      #{/crud.custom}
      #{crud.custom 'Action'}
        <a href="/payrollregister/${object.id}">Manage Payroll</a>
      #{/crud.custom}
    #{/crud.table}
  </div>

  <div id="crudListPagination">
    #{crud.pagination /}
  </div>

  <p id="crudListAdd">
    <a href="@{blank()}">&{'crud.add', type.modelName}</a>
  </p>

</div>
